package com.huakang.service.impl;

import com.huakang.entity.Operation;
import com.huakang.mapper.OperationMapper;
import com.huakang.service.OperationService;
import com.huakang.utils.OperationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class OperationServiceImpl implements OperationService {
@Autowired
    OperationMapper operationMapper;
    @Override
    public boolean insert(Operation operation) {
        return operationMapper.insertSelective(operation)>0?true:false;
    }

    @Override
    public List<OperationVo> getAll() {
        return operationMapper.select();
    }
}
